import React from 'react'
import {Link, useRoutes} from "react-router-dom";
import "./style.css"

import routes from "./router"


export function App() {
    return (
        <div>
            <div>
                <span>Header</span>
                <div>
                        <span>
                            {/*<NavLink to="/">首页</NavLink>*/}
                            {/*<NavLink to="/about">关于</NavLink>*/}
                            <Link to="/home">首页</Link>
                            <Link to="/about">关于</Link>
                            <Link to="/login">登录</Link>
                            <Link to="/user?name=wsb&age=18">用户</Link>

                        </span>
                    <span></span>
                </div>
            </div>
            {/*<Routes>*/}
            {/*    <Route path="/" element={<Home/>}></Route>*/}
            {/*    <Route path="/home" element={<Home/>}>*/}
            {/*        <Route path="/home" element={<Navigate to="/home/recommend"/>}></Route>*/}
            {/*        <Route path="/home/recommend" element={<Recommend/>}></Route>*/}
            {/*        <Route path="/home/ranking" element={<Ranking/>}></Route>*/}
            {/*        <Route path="/home/popular" element={<Popular/>}>*/}
            {/*            <Route path="/home/popular/detail/:id" element={<Detail/>}></Route>*/}
            {/*        </Route>*/}
            {/*    </Route>*/}
            {/*    <Route path="/about" element={<About/>}></Route>*/}
            {/*    <Route path="/login" element={<Login/>}></Route>*/}
            {/*    <Route path="/user" element={<User/>}></Route>*/}
            {/*    <Route path="*" element={<NotFound/>}></Route>*/}
            {/*</Routes>*/}
            {useRoutes(routes)}
            <div>Footer</div>
        </div>
    )
}

export default App